/**
 * 
 */
function getXMLHttpRequest() {    
	var xmlHttp;    
	try {    
		// Firefox, Opera 8.0+, Safari    
		xmlHttp = new XMLHttpRequest();    
	}    
	catch (e) {    
		// Internet Explorer    
		try {    
			//Internet Explorer 6.0+    
			xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");    
		}    
		catch (e) {    
			try {    
				//Internet Explorer 5.5+    
				xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");    
			}    
			catch (e) {    
				alert("您的浏览器不支持AJAX！");    
				xmlHttp = null;    
			}    
		}    
	}    
	return xmlHttp;    
}

function doAjax(url, params, callBack )
{
	var req=getXMLHttpRequest();
	if(req!=null)
		{
		req.onreadystatechange=function()
		{
			if(req.readyState==4)
			{
			if(200==req.status)
				{
				callBack(req.responseText);
				}
			else if(404==req.status)
				alert('404-HTTP请求错误');
			else if(500==req.status)
				alert('500-服务器内部错误');
			}
			
		};
		req.open("POST",url,true);
		req.setRequestHeader("Content-Type","application/x-www-form-urlencoded;;charset=utf-8");
		req.send(params);
		
		
		}
	}
